//app.js
App({
  globalData: {
    g_isPlayingMusic: false,
    g_currentMusicPostId: null,
    doubanApi: 'https://douban.uieee.com/v2/movie/'
  },

  //全局Promise
  getGlobalData: function (url) {
    return new Promise(function (resolve, reject) {
      wx.request({
        url: url,
        method: 'GET',
        header: {
          'content-type': 'json',
        },
        success: (res) => {
          resolve(res);
        },
        fail: (err) => {
          reject(err);
        },
      })
    })
  },
})
